{template 'common/header'}
<form action="" class="form-horizontal form" method="post" enctype="multipart/form-data">
<div class="main">
    <div class="panel panel-default">
      <div class="panel-heading">参数设置
	</div>
      <div class="panel-body">
        <div class="form-group clearfix">
			<label class="control-label col-md-2">积分设置</label>
			<div class="col-sm-10 col-xs-12">
				<div class="input-group form-group">
					<span class="input-group-addon"><!-------积分类型：
					<input type="radio" value="1" name="jftype"  {if $settings['jftype']=='1'}checked{/if}/> 积分 			
					<input type="radio" value="2" name="jftype"  {if $settings['jftype']=='2'}checked{/if}/> 余额					
					；-------->首次签到赠送</span>
					<input type="text" name="everyday"  class="form-control" value="{$settings['everyday']}" placeholder="默认赠送1积分"  maxlength="4" onkeyup="value=value.replace(/[^1234567890]+/g,'');"/>
					<span class="input-group-addon">分；续签递增</span>
					<input type="text" name="continuity"  class="form-control" value="{$settings['continuity']}" placeholder="默认为0,即不递增"  maxlength="4" onkeyup="value=value.replace(/[^1234567890]+/g,'');"/>
					<span class="input-group-addon">分；递增上限</span>
					<input type="text" name="intup"  class="form-control" value="{$settings['intup']}" placeholder="默认为0,即无上限"  maxlength="6" onkeyup="value=value.replace(/[^1234567890]+/g,'');"/>
					<span class="input-group-addon">分</span>
				</div>
			</div>
        </div>
        <div class="form-group clearfix">
			<label class="control-label col-md-2">时段设置</label>
			<div class="col-sm-10 col-xs-12">
				<div class="input-group form-group">
					<span class="input-group-addon">
					<input type="radio" value="0" name="time[is]"  {if (int)$settings['time']['is']=='0'}checked{/if}/> 不限 			
					<input type="radio" value="1" name="time[is]"  {if (int)$settings['time']['is']=='1'}checked{/if}/> 限制；开始时间：
					</span>
					<input type="text" name="time[a]"  class="form-control" value="{$settings['time']['a']}" placeholder="如8时30分就写 830"  maxlength="4" onkeyup="value=value.replace(/[^1234567890]+/g,'');" size='6'/>
					<span class="input-group-addon">；结束时间：</span>
					<input type="text" name="time[e]"  class="form-control" value="{$settings['time']['e']}" placeholder="如20时00分就写 2000"  maxlength="4" onkeyup="value=value.replace(/[^1234567890]+/g,'');" size='6'/>
					<span class="input-group-addon">；非时段提示语：</span>
					<input type="text" name="time[t]"  class="form-control" value="{$settings['time']['t']}" placeholder="请在每天8时到20时来签到" />
				</div>
			</div>
        </div>
        <div class="form-group clearfix">
			<label class="control-label col-md-2">额外奖励</label>
			<div class="col-sm-10 col-xs-12">
				<div class="input-group form-group">
					<span class="input-group-addon">
						<input type="radio" value="0" name="jl[is]"  {if (int)$settings['jl']['is']=='0'}checked{/if}/> 关 			
						<input type="radio" value="1" name="jl[is]"  {if (int)$settings['jl']['is']=='1'}checked{/if}/> 开
					</span>
					<span class="input-group-addon">活动时段：</span>
					<span class="input-group-addon">
					{if empty($settings['jl']['w'])}
						{php $settings['jl']['w']=range (12 , 14);}
					{/if}
						{php $nums = range (0 , 6);}
						{loop $nums $i}
							<input type="checkbox" name="jl[w][]" value="{$i}" {if in_array($i, $settings['jl']['w'])}checked="checked"{/if}/> {$wna[$i]}
						{/loop}
					</span>
					<span class="input-group-addon">得奖提示：</span>
					<input type="text" name="jl[ts]"  class="form-control" value="{$settings['jl']['ts']}" placeholder="常用变量：[当天签到量] [额外奖值]" />
				</div>
				{php $nums = range (0 , 4);}
				{loop $nums $i}
					<div class="input-group form-group">
						<span class="input-group-addon">奖项{php echo $i+1}：</span>					
						<span class="input-group-addon">当天前</span>
						<input type="text" name="jl[a][{$i}]"  class="form-control" value="{$settings['jl']['a'][$i]}" placeholder="(包含这个数)"  maxlength="3" onkeyup="value=value.replace(/[^1234567890]+/g,'');" size='4'/><span class="input-group-addon">位到</span>
						<input type="text" name="jl[b][{$i}]"  class="form-control" value="{$settings['jl']['b'][$i]}" placeholder="(包含这个数)"  maxlength="3" onkeyup="value=value.replace(/[^1234567890]+/g,'');" size='4'/><span class="input-group-addon">位签到者；</span>
						<span class="input-group-addon">奖励
							<input type="radio" value="1" name="jl[t][{$i}]"  {if $settings['jl']['t'][$i]=='1'}checked{/if}/> 积分 			
							<input type="radio" value="2" name="jl[t][{$i}]"  {if $settings['jl']['t'][$i]=='2'}checked{/if}/> 余额(单位：分)				
						</span>
						<input type="text" name="jl[e][{$i}]"  class="form-control" value="{$settings['jl']['e'][$i]}" placeholder=""  maxlength="4" onkeyup="value=value.replace(/[^1234567890]+/g,'');" size='5'/><span class="input-group-addon">分</span>
					</div>
				{/loop}
				<div class="help-block">规则：当天前几位签到者，给予额外奖励；余额的单位是分！奖励数额为0就是关闭奖励活动</div>
			</div>
        </div>
		<div class="form-group clearfix">
			<label class="control-label col-md-2">每日一提示</label>
			<div class="col-sm-5 col-xs-12">
				<div class="input-group form-group">
					<span class="input-group-addon">
						<input type="radio" value="0" name="tx[is]"  {if (int)$settings['tx']['is']=='0'}checked{/if}/> 关 			
						<input type="radio" value="1" name="tx[is]"  {if (int)$settings['tx']['is']=='1'}checked{/if}/> 开
					</span>
					<span class="input-group-addon">
						<input type="radio" value="1" name="tx[type]"  {if (int)$settings['tx']['type']=='1'}checked{/if}/> 倒计时：目标日期</span>
					<input type="text" name="tx[djs][day]"  class="form-control" value="{$settings['tx']['djs']['day']}" placeholder="格式如：20160707" maxlength="8" onkeyup="value=value.replace(/[^1234567890]+/g,'');"/>
				</div>
				<div class="input-group form-group">
					<span class="input-group-addon">
					<input type="radio" value="0" name="tx[type]"  {if (int)$settings['tx']['type']=='0'}checked{/if}/> 星期提示时段：</span>
					{php echo tpl_form_field_daterange('tx[time]', $settings['tx']['time'], true);}
				</div>				
				{php $nums = range (0 , 2);}
				{loop $nums $i}
					<div class="input-group form-group">
						<span class="input-group-addon">星期{$wna[$i]}提示：
						</span>
						<input type="text" name="tx[xq][t][{$i}]"  class="form-control" value="{$settings['tx']['xq']['t'][$i]}" placeholder="如：今天星期{$wna[$i]}，出门请带XXX" />
					</div>
				{/loop}
			</div>
			<div class="col-sm-5 col-xs-12">
				<div class="input-group form-group">
					<span class="input-group-addon">倒计时项目：</span>
					<input type="text" name="tx[djs][name]"  class="form-control" value="{$settings['tx']['djs']['name']}" placeholder="如：高考倒计时" />
				</div>
				{php $nums = range (3 , 6);}
				{loop $nums $i}
					<div class="input-group form-group">
						<span class="input-group-addon">星期{$wna[$i]}提示：
						</span>
						<input type="text" name="tx[xq][t][{$i}]"  class="form-control" value="{$settings['tx']['xq']['t'][$i]}" placeholder="如：今天星期{$wna[$i]}，出门请带XXX" />
					</div>
				{/loop}
			</div>
		</div>
        <div class="form-group clearfix">
          <label class="control-label col-md-2">提示栏默认</label>
          <div class="col-md-4">
            <input type="text" class="form-control" name="welcome" placeholder="默认：亲，欢迎您签到" value="{$settings['welcome']}">
          </div>
          <div class="col-md-6">
				<div class="input-group form-group">
					<span class="input-group-addon">提示栏链接：</span>
					<input type="text" class="form-control" name="url1[t]" placeholder="留空就自动进入会员中心" value="{$settings['url1']['t']}" >
				</div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="control-label col-md-2">签到积分排行板</label>
          <div class="col-md-3">
				<select class="form-control input-medium" name="ispaihang">
                    <option value="0" {if $settings['ispaihang']==0}selected{/if}>关闭排行板</option>
                    <option value="1" {if $settings['ispaihang']==1}selected{/if}>当天排行板</option>
                    <option value="2" {if $settings['ispaihang']==2}selected{/if}>7天排行板</option>
                    <option value="3" {if $settings['ispaihang']==3}selected{/if}>30天排行板</option>
                    <option value="5" {if $settings['ispaihang']==5}selected{/if}>本月排行板</option>
                    <option value="4" {if $settings['ispaihang']==4}selected{/if}>历史排行板</option>
				</select>
          </div>
          <div class="col-md-3">
				<select class="form-control input-medium" name="paihangt">
                    <option value="0" {if $settings['paihangt']==0}selected{/if}>单次(时间段内单次最高得分)</option>
                    <option value="1" {if $settings['paihangt']==1}selected{/if}>总分(时间段内得分总和)</option>
                    <option value="2" {if $settings['paihangt']==2}selected{/if}>次数(时间段内签到的次数)</option>
				</select>
          </div>
          <div class="col-md-2">
				<select class="form-control input-medium" name="px">
					<optgroup label="相同积分排序" />
                    <option value="1" {if $settings['px']==1}selected{/if}>后来居上</option>
                    <option value="2" {if $settings['px']==2}selected{/if}>先来后到</option>
				</select>
          </div> 
          <div class="col-md-2">
				<select class="form-control input-medium" name="paihangs">
					<optgroup label="显示条数,默认为前三名" />
                    <option value="3" {if $settings['paihangs']==3}selected{/if}>前三名</option>
                    <option value="5" {if $settings['paihangs']==5}selected{/if}>前五名</option>
                    <option value="8" {if $settings['paihangs']==8}selected{/if}>前八名</option>
                    <option value="10" {if $settings['paihangs']==10}selected{/if}>前十名</option>
				</select>
          </div>

        </div>

        <div class="form-group clearfix">
          <label class="control-label col-md-2">签到成功提示语</label>
          <div class="col-md-4">
            <textarea class="form-control" name="success_msg" placeholder="" rows="8">{$settings['success_msg']}</textarea>
            <div class="help-block">例如：签到成功啦！你已获得[签到积分]积分。</div>
          </div>
          <div class="col-md-3">
            <div class="help-block">变量说明<br>[昵称]：用户昵称<br>
[总积分]：用户目前拥有的总积分<br>
[签到总积分]：签到所得的积分总和<br>
[签到积分]：当次签到所赠送的积分<br>
[今天得分]：今天签到所赠送的积分<br>
[首次积分]：首次签到所赠送的积分<br>
[续签积分]：连续签到所递增积分值
			</div>
          </div>
          <div class="col-md-3">
            <div class="help-block">
<br>
[下期积分]：下期签到将赠送的积分<br>
[积分上限]：积分递增上限<br>
[当天签到量]：当天第几位签到者<br>
[额外奖值]：当天所得的额外奖值
			</div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="control-label col-md-2">签到失败提示语</label>
          <div class="col-md-4">
            <textarea class="form-control" name="continuity_msg" placeholder="" rows="6">{$settings['continuity_msg']}</textarea>
            <div class="help-block">例如：您今天已经签到过了！明天再来吧！</div>
          </div>
          <label class="control-label col-md-2">签到封面</label>
          <div class="col-md-4">
			{php echo tpl_form_field_image('linklogo', $settings['linklogo'])}
			<div class="help-block">建议尺寸900*500或720*400或360*200</div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="control-label col-md-2">封面标题</label>
          <div class="col-md-4">
				<input type="text" class="form-control" name="linktitle" placeholder="" value="{$settings['linktitle']}" >
				<div class="help-block">例如：亲爱的[昵称]，欢迎您签到！</div>
		  </div>
          <div class="col-md-6">
				<div class="input-group form-group">
					<span class="input-group-addon">封面链接：</span>
					<input type="text" class="form-control" name="url1[f]" placeholder="留空就自动进入会员中心" value="{$settings['url1']['f']}" >
				</div>
          </div>
        </div>
      	<div class="form-group clearfix">
          <label class="control-label col-md-2">广告位功能</label>
          <div class="col-md-4">
				<select id="common_corp" class="form-control input-medium" name="isgg">
                    <option value="0" {if $settings['isgg']==0}selected{/if}>关闭</option>
                    <option value="1" {if $settings['isgg']==1}selected{/if}>开启(能赚钱的签到)</option>
				</select>
          </div>
          <div class="col-md-6">
				<div class="input-group form-group">
					<span class="input-group-addon">排行链接：</span>
					<input type="text" class="form-control" name="url" placeholder="留空就自动进入会员中心" value="{$settings['url']}" >
				</div>
          </div>
        </div>
		
{if $settings['isgg']=='1'}
      	<div class="form-group clearfix">
          <label class="control-label col-md-2">商品推荐</label>
          <div class="col-md-3">
				<select id="common_corp" class="form-control input-medium" name="isint">
                    <option value="0" {if $settings['isint']==0}selected{/if}>关闭</option>
             {if pdo_tableexists('shopping_goods')}<option value="1" {if $settings['isint']==1}selected{/if}>微商城{if $_W['role'] == "founder"}(微擎商城){/if}</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：微商城...." />{/if}
             {if pdo_tableexists('ewei_shop_goods')}<option value="2" {if $settings['isint']==2}selected{/if}>分销商城（E版）{if $_W['role'] == "founder"}(人人商城){/if}</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：人人商城...." />{/if}
             {if pdo_tableexists('quickshop_goods')}<option value="3" {if $settings['isint']==3}selected{/if}>分销商城（X版）{if $_W['role'] == "founder"}(人人赚商城){/if}</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：人人赚商城...." />{/if}
             {if pdo_tableexists('surpershop_goods')}<option value="4" {if $settings['isint']==4}selected{/if}>分销商城（超级版）{if $_W['role'] == "founder"}(超级商城){/if}</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：超级商城...." />{/if}
             {if pdo_tableexists('weliam_indiana_goodslist')}<option value="5" {if $settings['isint']==5}selected{/if}>一元夺宝</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：一元夺宝...." />{/if}
             {if pdo_tableexists('superman_mall_item')}<option value="6" {if $settings['isint']==6}selected{/if}>超人商城</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：超人商城...." />{/if}
             {if pdo_tableexists('tg_goods')}<option value="7" {if $settings['isint']==7}selected{/if}>拼团商城</option>{elseif $_W['role'] == "founder"}<optgroup label="请您安装：拼团商城...." />{/if}
					<optgroup label="待增加...." />
				</select>
			 <div class="help-block">随机显示商城里的商品</div>
          </div>
		    <div class="col-md-1">
				<select class="form-control input-medium" name="shops">
					<optgroup label="最多显示条数" />
                    <option value="1" {if $settings['shops']==1}selected{/if}>1</option>
                    <option value="2" {if $settings['shops']==2}selected{/if}>2</option>
                    <option value="3" {if $settings['shops']==3}selected{/if}>3</option>
                    <option value="4" {if $settings['shops']==4}selected{/if}>4</option>
                    <option value="5" {if $settings['shops']==5}selected{/if}>5</option>
                    <option value="6" {if $settings['shops']==6}selected{/if}>6</option>
				</select>
          </div>
        </div>
			<hr/>展位设置(此设置会加入活动链接,可用在企业的通知,调研,或节日游戏活动,也可以是外部商品,更可以做固定广告位)<hr/>	
			{php $nums = range (0 , 4);}
			{loop $nums $i}
			<div class="form-group clearfix">
				<label class="control-label col-md-2">展位{php echo $i+1}封面图片</label>
				<div class="col-sm-3">
					{php echo tpl_form_field_image('wailink['. $i .'][picurl]', $settings['wailink'][$i]['picurl'])}
					<div class="help-block">正方形图片,大小 120*120 左右则可</div>
				</div>
				<div class="col-sm-7">
					<div class="input-group form-group">
						<span class="input-group-addon">标题：</span>
						<input type="text" class="form-control" name="wailink[{$i}][title]" placeholder="广告位\商品\活动\通知\调研\游戏\应用...." value="{$settings['wailink'][$i]['title']}" >
					</div>
					<div class="input-group form-group">
						<span class="input-group-addon">链接：</span>
						<input type="text" class="form-control" name="wailink[{$i}][url]" placeholder="" value="{$settings['wailink'][$i]['url']}" >
					</div>
					<div class="input-group form-group">
						<span class="input-group-addon">设置：</span><span class="input-group-addon">
							<input type="radio" value="0" name="wailink[{$i}][is]"  {if $settings['wailink'][$i]['is']=='0'}checked{/if}/> 关闭
							<input type="radio" value="1" name="wailink[{$i}][is]"  {if $settings['wailink'][$i]['is']=='1'}checked{/if}/> 当次
							<input type="radio" value="2" name="wailink[{$i}][is]"  {if $settings['wailink'][$i]['is']=='2'}checked{/if}/> 当天
							<input type="radio" value="3" name="wailink[{$i}][is]"  {if $settings['wailink'][$i]['is']=='3'}checked{/if}/> 总分
						</span>
						<span class="input-group-addon">得分在</span>
						<input type="text" name="wailink[{$i}][fs]"  class="form-control" value="{$settings['wailink'][$i]['fs']}" placeholder="包含"  maxlength="8" onkeyup="value=value.replace(/[^1234567890]+/g,'0');"/>
						<span class="input-group-addon">到</span>
						<input type="text" name="wailink[{$i}][fsu]"  class="form-control" value="{$settings['wailink'][$i]['fsu']}" placeholder="包含"  maxlength="8" onkeyup="value=value.replace(/[^1234567890]+/g,'0');"/>
						<span class="input-group-addon">时展示</span>
					</div>
					<div class="input-group form-group">
						<span class="input-group-addon">时间：</span>
						{php echo tpl_form_field_daterange('wailink['. $i .'][time]', $settings['wailink'][$i]['time'], true);}
					</div>
				</div>
			</div><hr/>	
			{/loop}
			{if $_W['role'] == "founder" and $issf==0 }
        <div class="form-group clearfix">
          <label class="control-label col-md-2">广告补贴设置<br>(目前仅站长能设置)</label>
          <div class="col-md-4"><B>请在2016年1月1日之前设置了USERID的用户重新操作第二步获取一下最新ID</B><br>
				第一步，扫描右边二维码关注我司公众号;<br>第二步，回复“模块广告”四个字你将会收到你的用户USERID和OPENID;<br>第三步，请将你的信息填在这里，提交即可;<br>提示，如果有多个公众号的，每个公众号都要填写（同一个收益人则无需重复扫码）<br><b>设置必读：</b>目前免费模块广告补贴模式还在试运行阶段，所以您不一定能收到准确的补贴，也随时有可能在没有通知您的情况下暂停或取消这种模式！如果您介意的可不要设置！
		  </div>
          <div class="col-md-2">
				<img  src='{MODULE_URL}template/wxqiandao.jpg' width='200' height='200' class='img-rounded'>
		  </div>
          <div class="col-md-4">
					<div class="input-group form-group">
						<span class="input-group-addon">USERID：</span>
						<input type="text" class="form-control" name="btggid" placeholder="填入收益人在我司公众号的USERID" value="{$settings['btggid']}" >
					</div>
					<div class="input-group form-group">
						<span class="input-group-addon">OPENID：</span>
						<input type="text" class="form-control" name="btggopenid" placeholder="填入收益人在我司公众号的OPENID" value="{$settings['btggopenid']}" >
					</div>
					<div class="input-group form-group">
						<span class="input-group-addon">显示条数：</span>
						<input type="text" class="form-control" name="btggts" placeholder="每次显示的商品数" value="{$settings['btggts']}" readOnly="true">
					</div>
          </div>
        </div>
(这是免费模块！可能会有一些化妆品之类的广告(广告展示规则，每次会有一款广告的商品在你的商品里推荐下面顺带展出，如果你还有意做广告的，可以联系客服代理我们的产品，有分拥哦)！如不想有广告！<a href='http://s.we7.cc/index.php?c=store&a=application&id=889' title='点击进入微擎查看详情' target='_blank'>请上应用商城购买《天天签到VIP 》！</a>此提示只有站长可见无须删除！请联系 QQ 93211308 授权IP 或加QQ群 485696635)<hr/>{/if}
		{/if}	
			
      </div>
	</div>
</div>
{$txtr}
<input type="hidden" name="token" value="{$_W['token']}"/>
</form>

{template 'common/footer'}
